from pydantic import Field

from forward.extend.pydantic.base import BaseSchema


class CodeBatchSchema(BaseSchema):
    prefix: str = Field(max_length=32, description="前缀")
    begin_num: int = Field(description="开始码")
    end_num: int = Field(description="结束码")
    status: int = Field(0, description="状态")
    remark: str | None = Field(None, description="备注")
    file_path: str | None = Field(None, description="文件路径")


class CodeBatchOutSchema(CodeBatchSchema):
    id: int


class CodeBatchCreateSchema(CodeBatchSchema):
    pass


class CodeBatchUpdateSchema(CodeBatchSchema):
    pass
